<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html >
<head>
	<meta name="decorator" content="sysDefault" content="text/html; charset=utf-8"/>
	<script src="${staticPath}/js/pospay/opendialog.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#key").focus();
			$("#dataForm").validate({
				submitHandler: function(form){
					Oosp_Loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
		
	</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">编辑数据
						<a class="btn btn-default btn-sm pull-right" role="button" href="${contextPath}/sys/sitenav/view?siteNavId=${siteNavMenu.siteNavId}" >返回</a>
				    </h3>
				  </div>
				  <div class="panel-body">
					<form:form id="dataForm" modelAttribute="siteNavMenu" action="${contextPath}/sys/sitenavmenu/save" method="post" class="form-horizontal" role="form">
						<form:hidden path="id"/>
						<tags:message content="${message}"/>
								<div class="form-group">
									<label for="rowNo" class="col-sm-2 control-label">名称:</label>
									<div class="col-sm-2">
										<form:input id="name" path="name" maxlength="80" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="bankNo" class="col-sm-2 control-label">排序号:</label>
									<div class="col-sm-2">
										<form:input id="sort" path="sort" maxlength="4" class="form-control" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" />
									</div>
								</div>
								<div class="form-group">
									<label for="bankName" class="col-sm-2 control-label">上级菜单:</label>
									<div class="col-sm-2">
										<form:input id="parentName" path="parentName" maxlength="20" class="form-control" disabled="true"/>
										<form:hidden id="parentId" path="parentId"/>
									</div>
								</div>
								<div class="form-group">
									<label for="bankArg" class="col-sm-2 control-label">链接地址:</label>
									<div class="col-sm-2">
										<form:input id="href" path="href" maxlength="255" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="bankArg" class="col-sm-2 control-label">目标:</label>
									<div class="col-sm-2">
										<form:input id="target" path="target" maxlength="255" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="bankArg" class="col-sm-2 control-label">图标:</label>
									<div class="col-sm-2">
										<form:input id="icon" path="icon" maxlength="255" class="form-control"/>
									</div>
								</div>
								<div class="form-group">
									<label for="bankArg" class="col-sm-2 control-label">是否显示:</label>
									<div class="col-sm-2">
										　
										<form:radiobutton id="isshow" path="isshow" value="1" checked="checked" /> 是　　　
										<form:radiobutton id="isshow" path="isshow" value="0" /> 否
									</div>
								</div>
								<div class="form-group">
									<label for="bankArg" class="col-sm-2 control-label">预留字段:</label>
									<div class="col-sm-2">
										<form:input id="createOrgId" path="createOrgId" maxlength="32" class="form-control"/>
									</div>
								</div>
										<form:hidden id="siteNavId" path="siteNavId" />
										
								<div class="form-group">
									<label for="bankArg" class="col-sm-2 control-label">权限标示:</label>
									<div class="col-sm-4">
										<form:input id="permission" path="permission" maxlength="60" class="form-control"/>
									</div>
									</div>
									
						<div class="form-group">
						  <div class="col-sm-offset-2 col-sm-10">
						    <input class="btn btn-primary" type="submit" value="保 存"/>
							<a class="btn btn-default" role="button" href="${contextPath}/sys/sitenav/view?siteNavId=${siteNavMenu.siteNavId}" >返回</a>
						  </div>
						</div>
					</form:form>
				  </div>
				</div>			
			</div>
		</div>
	</div>
</body>
</html>